<?php 
namespace Phpcmf\Controllers;


class Fabu extends \Phpcmf\Home\Module
{
    
    public function fabuid() {
        //九格图
        $data = \Phpcmf\Service::M()->db->table('field')->where('name', '九格图')->where('fieldname', 'jiugetu')->where('relatedname', 'mform-quan')->where('fieldtype', 'Files')->get()->getRowArray();
        $shipin_1 = \Phpcmf\Service::M()->db->table('field')->where('name', '视频')->where('fieldname', 'shipin')->where('relatedname', 'mform-quan')->where('fieldtype', 'Files')->get()->getRowArray();
        //圈子图标 thumb
		$quan_tubiao = \Phpcmf\Service::M()->db->table('field')->where('name', '图标')->where('fieldname', 'thumb')->where('relatedname', 'module')->where('fieldtype', 'File')->get()->getRowArray();
		$yinpinid = \Phpcmf\Service::M()->db->table('field')->where('name', '音频')->where('fieldname', 'yinpin')->where('relatedname', 'mform-quan')->where('fieldtype', 'Files')->get()->getRowArray();
		$fujianid = \Phpcmf\Service::M()->db->table('field')->where('name', '文件')->where('fieldname', 'wenjian')->where('relatedname', 'mform-quan')->where('fieldtype', 'Files')->get()->getRowArray();
		$dataid=[
            'jiugetu'=> $data['id'], //九格图
			'shipin' => $shipin_1['id'], //视频
			'quan_tubiao' => $quan_tubiao['id'], // 圈子图标
			'yinpinid' => $yinpinid['id'],// 音频
			'fujianid' => $fujianid['id'],//  附件
        ];
        
        $rt=[
			'code'=>1,
		    'msg'=>'发布id',
			'data'=>$dataid,
		];
		return $this->_json($rt['code'], $rt['msg'], $rt['data']);
        
    }
    
	
}